package demo1;

import java.util.LinkedList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<Integer> list = new LinkedList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        System.out.println(list);
    }

    public static void main1(String[] args) {
        MyLinkdeList myLinkdeList = new MyLinkdeList();
        /*myLinkdeList.addFirst(5);
        myLinkdeList.addFirst(4);
        myLinkdeList.addFirst(3);
        myLinkdeList.addFirst(2);
        myLinkdeList.addFirst(1);
        myLinkdeList.display();
        System.out.println(myLinkdeList.size());
        System.out.println(myLinkdeList.contains(1));*/
        myLinkdeList.addLast(1);
        myLinkdeList.addLast(1);
        myLinkdeList.addLast(1);
        myLinkdeList.addLast(1);
        myLinkdeList.addLast(1);
        //myLinkdeList.addIndex(1, 77);
        //myLinkdeList.addIndex(5, 88);
//        myLinkdeList.display();
        //myLinkdeList.remove(5);
        //myLinkdeList.clear();
        myLinkdeList.removeAllKey(1);
        myLinkdeList.display();
    }
}
